<#compress>
    <@override name="title">品牌管理</@override>
    <@override name="viewbody">
    <div class="row">
        <div class="col-md-12">
            <h3 class="page-title">
                品牌管理
                <small>购物中心品牌管理.</small>
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="${ctx}/admin/home">
                        首页
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">
                        品牌管理
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="portlet box light-grey">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-globe"></i>品牌一览表
                    </div>
                </div>
                <div class="portlet-body">


                    <div class="row">
                        <div class="col-md-12">
                            <form action="#" role="form" class="form-inline" id="search_form">
                                <div class="form-group nowarp">
                                    <label for="floor" class="control-label col-md-4">品牌名称：</label>
                                    <div class="col-md-8">
                                        <input type="text" class="form-control input-sm" name="name" placeholder="请输入中文或英文名">
                                    </div>
                                </div>
                                <div class="form-group nowarp">
                                    <label for="floor" class="control-label col-md-4">楼层：</label>
                                    <div class="col-md-8">
                                        <select id="floor" name="floor" class="form-control input-sm input-small select2me">
                                            <option value="0">请选择楼层</option>
                                            <#list floors?if_exists as floor>
                                                <option value="${floor.id!}">${floor.name!}</option>
                                            </#list>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group nowarp">
                                    <label for="floor" class="control-label col-md-4">业态：</label>
                                    <div class="col-md-8">
                                        <select id="floor" name="format" class="form-control input-sm input-small select2me">
                                            <option value="0">请选择业态</option>
                                            <#list formats?if_exists as format>
                                                <option value="${format.id!}">${format.name!}</option>
                                            </#list>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group nowarp">
                                    <button class="btn btn-sm blue filter-submit margin-bottom" id="search_btn">
                                        <i class="fa fa-search"></i> 检索
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="table-toolbar">
                        <div class="btn-group">
                            <a id="floor_create" href="${ctx}/admin/brand/create" class="btn default green-stripe">
                                新增 <i class="fa fa-plus"></i>
                            </a>
                            <a id="floor_batch_delete" class="btn default yellow-stripe batchdelete"
                               data-action="${ctx}/admin/brand/remove" data-tables="#brand-list"
                               data-message="您确认删除所选择的品牌信息么？">
                                删除 <i class="fa fa-ban"></i>
                            </a>
                        </div>
                        <div class="btn-group pull-right">
                            <button class="btn dropdown-toggle" data-toggle="dropdown">其他 <i
                                    class="fa fa-angle-down"></i>
                            </button>
                            <ul class="dropdown-menu pull-right">
                                <li>
                                    <a href="#">导出Excel
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="brand-list">
                        <thead>
                        <tr>
                            <th width="30"><input type="checkbox" name="checkall"></th>
                            <th width="30">序号</th>
                            <th style="display: none;">ID</th>
                            <th>品牌中文名</th>
                            <th>品牌英文名</th>
                            <th>楼层</th>
                            <th>业态</th>
                            <th>logo</th>
                            <th>描述</th>
                            <th>图片</th>
                            <th>联系方式</th>
                            <th>店铺位置</th>
                            <th>店铺商品</th>
                            <th>信息完整度</th>
                            <th style="display: none;">购物中心</th>
                            <th style="text-align: center" width="120">操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        </tbody>
                    </table>
                </div>

            </div>
        </div>
    </div>
    <#--Template-->
    <script id="action_template" type="text/x-handlebars-template">
        <a href="${ctx}/admin/brand/edit/{{id}}" class="btn default blue-stripe" title="编辑">
            <i class="fa fa-edit"></i>
        </a>
        <a href="javascript:void(0);" class="btn default purple-stripe" title="采集"
           data-hook="ajax-action" data-message="您确定采集改品牌的信息么，这个操作可能会耗时较长！"
           data-action="${ctx}/admin/brand/gather?DATA={{id}}">
            <i class="fa fa-magic"></i>
        </a>
        <a href="javascript:void(0);" class="btn default yellow-stripe" title="删除" data-hook="remove-action"
           data-action="${ctx}/admin/brand/remove?DATA={{id}}">
            <i class="fa fa-trash-o"></i>
        </a>
    </script>
    <script id="product_template" type="text/x-handlebars-template">
        <a href="${ctx}/admin/commodity/{{id}}" class="btn default btn-xs green-stripe" title="查看">
            查看店铺商品
        </a>
    </script>
    </@override>

    <@override name="viewparams">
    g.actiontpl = '#action_template';
    g.producttpl = '#product_template';
    </@override>

    <@override name="viewmodule">brand_list</@override>
    <@extends name="../_basic/main.ftl"></@extends>
</#compress>